<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>仓库管理 | 电动车销售系统</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/warehouse/warehouseadmin.css">
</head>
<body>
<header class="dashboard-header">
    <div class="container">
        <div class="d-flex justify-content-between align-items-center">
            <div>
                <h1 class="h3 mb-0"><i class="bi bi-bicycle"></i> 电动车销售管理系统</h1>
                <p class="mb-0 opacity-75">仓库管理工作台</p>
            </div>
            <div class="d-flex align-items-center">
                <div class="me-3">
                    <span class="d-none d-md-inline">仓库管理员</span>
                    <div class="badge bg-light text-dark">
                        <i class="bi bi-person-circle me-1"></i> 仓库管理员
                    </div>
                </div>
                <div class="dropdown">
                    <button class="btn btn-light rounded-circle p-1" type="button" data-bs-toggle="dropdown">
                        <i class="bi bi-gear fs-5"></i>
                    </button>
                    <ul class="dropdown-menu dropdown-menu-end">
                        <li><a class="dropdown-item" href="${pageContext.request.contextPath}/change_password.jsp"><i class="bi bi-lock me-2"></i> 修改密码</a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><a class="dropdown-item text-danger" href="${pageContext.request.contextPath}/LogoutServlet"><i class="bi bi-box-arrow-right me-2"></i> 退出登录</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</header>

    <div class="dashboard-card shadow">
        <div class="card-header">
            <div>
                <h5 class="card-title"><i class="bi bi-list-check me-2 text-primary"></i>仓库管理功能</h5>
                <p class="card-subtitle">选择您需要执行的操作</p>
            </div>
        </div>

        <div class="menu-list">
            <a href="/web/OrderReviewServlet" class="menu-item">
                <div class="menu-icon order">
                    <i class="bi bi-clipboard-check"></i>
                </div>
                <div class="menu-content">
                    <div class="menu-title">订单审核</div>
                    <div class="menu-description">审核销售订单，确认库存情况并准备发货</div>
                </div>
                <div class="arrow-icon">
                    <i class="bi bi-arrow-right"></i>
                </div>
            </a>

            <a href="/web/StockQueryServlet" class="menu-item">
                <div class="menu-icon stock">
                    <i class="bi bi-boxes"></i>
                </div>
                <div class="menu-content">
                    <div class="menu-title">查看库存</div>
                    <div class="menu-description">实时查看和管理电动车库存状态</div>
                </div>
                <div class="arrow-icon">
                    <i class="bi bi-arrow-right"></i>
                </div>
            </a>

            <a href="/web/InboundQueryServlet" class="menu-item">
                <div class="menu-icon inbound">
                    <i class="bi bi-truck"></i>
                </div>
                <div class="menu-content">
                    <div class="menu-title">入库单查询</div>
                    <div class="menu-description">处理新到电动车的入库流程</div>
                </div>
                <div class="arrow-icon">
                    <i class="bi bi-arrow-right"></i>
                </div>
            </a>

            <a href="/web/warehouse/deleteStock.jsp" class="menu-item">
                <div class="menu-icon delete">
                    <i class="bi bi-trash"></i>
                </div>
                <div class="menu-content">
                    <div class="menu-title">删除库存信息</div>
                    <div class="menu-description">维护库存信息，处理损坏或过时库存</div>
                </div>
                <div class="arrow-icon">
                    <i class="bi bi-arrow-right"></i>
                </div>
            </a>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
    // 添加菜单项的悬停效果
    document.querySelectorAll('.menu-item').forEach(item => {
        item.addEventListener('mouseenter', function() {
            const icon = this.querySelector('.menu-icon');
            icon.style.transform = 'scale(1.1)';
            icon.style.transition = 'transform 0.3s ease';
        });

        item.addEventListener('mouseleave', function() {
            const icon = this.querySelector('.menu-icon');
            icon.style.transform = 'scale(1)';
        });
    });

    // 添加页面加载动画
    document.addEventListener('DOMContentLoaded', function() {
        const menuItems = document.querySelectorAll('.menu-item');
        menuItems.forEach((item, index) => {
            item.style.opacity = '0';
            item.style.transform = 'translateY(20px)';

            setTimeout(() => {
                item.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
                item.style.opacity = '1';
                item.style.transform = 'translateY(0)';
            }, 200 * index);
        });
    });
</script>
</body>
</html>